<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<form:form commandName="auditFilter" cssClass="form-horizontal"
	role="form" onsubmit="return false;">
	<div class="form-group">
		<label class="col-sm-1 control-label no-padding-right"
			   for="summaryId">申报单号</label>
		<div class="col-sm-5">
			<input type="text" name="summaryId" id="summaryId"
				   placeholder="请输入申报单号" value="${auditFilter.summaryId}"
				   class="form-control required">
		</div>

		<label class="col-sm-1 control-label no-padding-right"
			   for="totalInver">申报全额</label>
		<div class="col-sm-5">
			<input type="text" name="totalInver" id="totalInver"
				   placeholder="请输入申报全额" value="${auditFilter.totalInver}"
				   class="form-control required">
		</div>


	</div>

	<div class="form-group">
		<label class="col-sm-1 control-label no-padding-right"
			   for="investorName">投资方名</label>
		<div class="col-sm-5">
			<input type="text" name="investorName" id="investorName"
				   placeholder="请输入投资方名称" value="${auditFilter.investorName}"
				   class="form-control required">
		</div>

		<label class="col-sm-1 control-label no-padding-right"
			   for=projectName>项目名称</label>
		<div class="col-sm-5">
			<input type="text" name="projectName" id="projectName"
				   placeholder="请输入项目名称" value="${auditFilter.projectName}"
				   class="form-control required">
		</div>

	</div>

	<div class="form-group">

		<label class="col-sm-1 control-label no-padding-right"
			   for="projectStatus">项目状态</label>
		<div class="col-sm-5">
			<select name="projectStatus" class="form-control required"
					style="width: 100%" data-placeholder="请选择" id="projectStatus">
				<option value="${auditFilter.projectStatus}">${auditFilter.projectStatus}</option>
				<option value="项目无法落地">项目无法落地</option>
				<option value="仍在审批阶段、未办结">仍在审批阶段、未办结</option>
				<option value="已开工建设、未建成投产或正式营业">已开工建设、未建成投产或正式营业</option>
			</select>
		</div>


		<label class="col-sm-1 control-label no-padding-right"
			   for="explains">说明</label>
		<div class="col-sm-5">
			<input type="text" name="explains" id="explains"
				   placeholder="请输入说明，必填" value="${auditFilter.explains}"
				   class="form-control required">
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-1 control-label no-padding-right"
			   for="isnnu">是否纳统</label>
		<div class="col-sm-5">
			<select name="isnnu" class="form-control required"
					style="width: 100%" data-placeholder="请选择" id="isnnu">
				<option value="${auditFilter.isnnu}">
					<c:if test="${auditFilter.isRatepay == 0}"><p>否</p></c:if>
					<c:if test="${auditFilter.isRatepay == 1}"><p>是</p></c:if>
				</option>
				<option value="0">否</option>
				<option value="1">是</option>
			</select>
		</div>

		<label class="col-sm-1 control-label no-padding-right"
			   for="isRatepay">是否纳税</label>
		<div class="col-sm-5">
			<select name="isRatepay" class="form-control required"
					style="width: 100%" data-placeholder="请选择" id="isRatepay">
				<option value="${auditFilter.isRatepay}">
					<c:if test="${auditFilter.isRatepay == 0}"><p>否</p></c:if>
					<c:if test="${auditFilter.isRatepay == 1}"><p>是</p></c:if>
				</option>
				<option value="0">否</option>
				<option value="1">是</option>
			</select>
		</div>

		<input type="text" name="capitalId" id="capitalId"
			   placeholder="请输入投资方名称" value="${auditFilter.capitalId}"
			   class="form-control required" style="display: none">
		<input type="text" name="isaudit" id="isaudit"
			   placeholder="请输入投资方名称" value="${auditFilter.isaudit}"
			   class="form-control required" style="display: none">

	</div>



	<!-- <div class="form-group">
			<label class="col-sm-2 control-label no-padding-right"
			for="optionA">分类</label>
			
	</div>  -->



	<form:hidden path="sysId" />
</form:form>
<script src="<s:url value="/assets/js/chosen.jquery.js"></s:url>"></script>
<script src="<s:url value="/assets/js/ajaxfileupload.js"></s:url>"></script>
<script src="<s:url value="/assets/js/jquery-ui.js"></s:url>"></script>

<div id="dialog" title="提示">
	<div class="progress progress-striped active">
		<div class="progress-bar progress-bar-success" role="progressbar"
			aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
			style="width: 100%;"></div>

	</div>
	<p>正在上传 请稍后……</p>
</div>

<script type="text/javascript">
	$('#editor1').ace_wysiwyg({
		toolbar : [ 'font', null, 'fontSize', null, {
			name : 'bold',
			className : 'btn-info'
		}, {
			name : 'italic',
			className : 'btn-info'
		}, {
			name : 'strikethrough',
			className : 'btn-info'
		}, {
			name : 'underline',
			className : 'btn-info'
		}, null, {
			name : 'createLink',
			className : 'btn-pink'
		}, {
			name : 'unlink',
			className : 'btn-pink'
		}, null, {
			name : 'insertImage',
			className : 'btn-success'
		}, null, 'foreColor', null, {
			name : 'undo',
			className : 'btn-grey'
		}, {
			name : 'redo',
			className : 'btn-grey'
		} ]
	});
	//settingOneCheckTreeParam('#deptRelation','#deptRelation','resourceTree','#resourceTree','#resourceContent','<s:url value="/modules/sys/dept/json"></s:url>','#deptLevel','${sysDept.sysId}');

	/* settingOneCheckTreeParam({
		inputObjKey : '#deptRelation',
		treeObjName : 'resourceTree',
		treeContentKey : '#resourceContent',
	url : '<s:url value="/modules/sys/dept/json"></s:url>',
	levelKey : '#deptLevelForm',
	sysId : '${QuestionBank.sysId}'
	}); */

	$("#dialog").hide();
	$("#btn").click(function() {
		var fileval = $("#fileupload").val();
		if (fileval == null || fileval == "") {
			alert("未选择任何文件");
			return;
		}

		$("#dialog").show();
		$("#dialog").dialog();
		$.ajaxFileUpload({
			type : "post",
			fileElementId : "fileupload",
			secureuri : false,
			dataType : 'json',
			url : "/pictureUpload/uploadBatch",
			async : false,
			success : function(data) {
				var val = data.data.sysid;
				console.log(val);
				$("#taxproof").attr("value", val);
				$("#dialog").dialog("close");
				alert("成功");
			},
			error : function(data) {
				$("#dialog").dialog("close");
				alert("图片上传失败 ！！请联系管理员");
			}

		});

	});
	var isauditval = $("#isaudit").val();
	console.log(isauditval);
	if(isauditval=='1'){
		$("#updatebtn").attr("disabled", true);
		console.log(isauditval+"111");
	}
	
	function findtwoClass() {
		var teamID = $("#teamId").val();
		var teamClassname = $("#teamId").find("option:selected").text();
		$("#teamClass").attr("value",teamClassname);
		
		//alert(teamID);
		var teamcla = {
			"teamId" : teamID
		};
		$.ajax({
			url : "/chart/show/getTeamclassNames",
			dataType : "json", //返回数据形式为json
			type : "POST",
			contentType : 'application/json;charset=UTF-8',
			data : JSON.stringify(teamcla),
			success : function(data) {
				$("#teamname option").remove();
				$("#teamname").append(" <option value='00'>请选择</option>");
				for (var i = 0; i < data.data.length; i++) {
					var teamid = data.data[i].teamId;
					var teamname = data.data[i].teamName;
					$("#teamname").append(
							"<option value='"+teamname+"'>" + teamname
									+ "</option>");
					//console.log(teamname);
				}
			}
		});

	}
</script>
